package com.javademos.train.dynamicdatasource.view.controller;

import com.javademos.train.dynamicdatasource.test.mapper.TestUserDao;
import com.javademos.train.dynamicdatasource.ye.mapper.YeUserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class MyTest {

    @Autowired
    private TestUserDao testDao;

    @Autowired
    private YeUserDao yeDao;

    @RequestMapping("/test")
    public void test1() {
        testDao.insert("test");
    }

    @RequestMapping("/ye")
    public void test2() {
        yeDao.insert("ye");
    }
}
